package test06.tx1;

import java.util.Random;

// 水果 - 给女孩提供各种类型的水果
public class Fruit {
    private String[] fruitArray = {"苹果","雪梨","香蕉","苹果1","雪梨1","香蕉1"};

    private int index;

    public Fruit (){
        this.index = new Random().nextInt(fruitArray.length);
    }

    public String toString(){
        return fruitArray[index];
    }
}
